.class public Lcom/instagram/android/service/MediaService;
.super Landroid/app/IntentService;
.source "MediaService.java"


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 35
    const-string v0, "MediaService"

    invoke-direct {p0, v0}, Landroid/app/IntentService;-><init>(Ljava/lang/String;)V

    .line 36
    return-void
.end method

.method private a(Landroid/content/Intent;)I
    .locals 2
    .parameter

    .prologue
    .line 64
    const-string v0, "MediaService.INTENT_EXTRA_PERFORM_ACTION"

    const/4 v1, -0x1

    invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public static a(Landroid/content/Context;Lcom/instagram/j/l;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    const/4 v0, 0x1

    .line 77
    invoke-virtual {p1, v0}, Lcom/instagram/j/l;->a(I)V

    .line 78
    invoke-virtual {p1, v0}, Lcom/instagram/j/l;->a(Z)V

    .line 80
    invoke-virtual {p1}, Lcom/instagram/j/l;->b()Lcom/instagram/android/model/b/e;

    move-result-object v0

    .line 81
    invoke-virtual {v0}, Lcom/instagram/android/model/b/e;->t()V

    .line 82
    invoke-virtual {v0}, Lcom/instagram/android/model/b/e;->y()V

    .line 84
    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Lcom/instagram/android/service/MediaService;->a(Landroid/content/Context;Lcom/instagram/j/l;I)V

    .line 85
    return-void
.end method

.method public static a(Landroid/content/Context;Lcom/instagram/j/l;I)V
    .locals 4
    .parameter
    .parameter
    .parameter

    .prologue
    .line 88
    invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    .line 90
    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/instagram/android/service/MediaService;

    invoke-direct {v1, v0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 92
    const-string v2, "MediaService.INTENT_EXTRA_PERFORM_ACTION"

    invoke-virtual {v1, v2, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 93
    const-string v2, "MediaService.INTENT_EXTRA_PENDING_MEDIA_ID"

    invoke-virtual {p1}, Lcom/instagram/j/l;->c()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 95
    invoke-virtual {v0, v1}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 96
    return-void
.end method

.method private a(Lcom/instagram/j/l;)V
    .locals 2
    .parameter

    .prologue
    .line 59
    new-instance v0, Lcom/instagram/android/service/l;

    new-instance v1, Lcom/instagram/android/service/j;

    invoke-direct {v1, p0, p1}, Lcom/instagram/android/service/j;-><init>(Lcom/instagram/android/service/MediaService;Lcom/instagram/j/l;)V

    invoke-direct {v0, p0, p1, v1}, Lcom/instagram/android/service/l;-><init>(Lcom/instagram/android/service/MediaService;Lcom/instagram/j/l;Lcom/instagram/android/service/k;)V

    .line 60
    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/instagram/android/service/l;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 61
    return-void
.end method

.method private b(Landroid/content/Intent;)Lcom/instagram/j/l;
    .locals 2
    .parameter

    .prologue
    .line 68
    const-string v0, "MediaService.INTENT_EXTRA_PENDING_MEDIA_ID"

    invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 69
    if-nez v0, :cond_0

    .line 70
    const/4 v0, 0x0

    .line 73
    :goto_0
    return-object v0

    :cond_0
    invoke-static {}, Lcom/instagram/j/u;->a()Lcom/instagram/j/u;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/instagram/j/u;->b(Ljava/lang/String;)Lcom/instagram/j/l;

    move-result-object v0

    goto :goto_0
.end method


# virtual methods
.method protected onHandleIntent(Landroid/content/Intent;)V
    .locals 4
    .parameter "intent"

    .prologue
    .line 40
    invoke-direct {p0, p1}, Lcom/instagram/android/service/MediaService;->a(Landroid/content/Intent;)I

    move-result v0

    .line 41
    invoke-direct {p0, p1}, Lcom/instagram/android/service/MediaService;->b(Landroid/content/Intent;)Lcom/instagram/j/l;

    move-result-object v1

    .line 43
    if-nez v1, :cond_0

    .line 44
    const-string v0, "MediaService"

    const-string v1, "Media is null, cannot continue"

    invoke-static {v0, v1}, Lcom/facebook/e/a/a;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 56
    :goto_0
    return-void

    .line 48
    :cond_0
    packed-switch v0, :pswitch_data_0

    .line 54
    new-instance v1, Ljava/lang/UnsupportedOperationException;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Action not handled or invalid: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V

    throw v1

    .line 50
    :pswitch_0
    invoke-direct {p0, v1}, Lcom/instagram/android/service/MediaService;->a(Lcom/instagram/j/l;)V

    goto :goto_0

    .line 48
    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
    .end packed-switch
.end method
